home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug231 / file.h < prev    next >
Text File  |  1987-06-17  |  640b  |  31 lines

  1. /*
  2.     Little Smalltalk
  3.  
  4.         class File definitions
  5.         timothy a. budd, 11/84
  6. */
  7. /*
  8.     files use standard i/o package
  9. */
  10.  
  11. struct file_struct {
  12.     int l_ref_count;
  13.     int l_size;
  14.     int file_mode;
  15.     FILE *fp;
  16.     };
  17.  
  18. typedef struct file_struct file;
  19.  
  20. extern object *new_file();
  21. extern object *file_read();
  22.  
  23. /* files can be opened in one of three modes, modes are either
  24.     0 - char mode - each read gets one char
  25.     1 - string mode - each read gets a string
  26.     2 - integer mode - each read gets an integer
  27. */
  28. # define CHARMODE 0
  29. # define STRMODE  1
  30. # define INTMODE  2
  31.